const path = require('path');

module.exports = {
    devServer: {
        proxy: {
            '/api': {
                target: 'http://vt2.ossjk.com',
                ws: true,
                changeOrigin: true,
                pathRewrite:{
                    '^/api':"/"
                }
            }
        }
    },
    configureWebpack: {
        resolve: {
            alias: {
                "@components": path.resolve(__dirname, 'src/components'),
                "@plugins": path.resolve(__dirname, 'src/plugins/'),
                "@utils": path.resolve(__dirname, 'src/utils/'),
                "@router": path.resolve(__dirname, 'src/router/'),
                "@store": path.resolve(__dirname, 'src/store/'),
                "@css": path.resolve(__dirname, 'src/style/'),
                "@apis": path.resolve(__dirname, 'src/apis/'),
                "@views": path.resolve(__dirname, 'src/views/'),
            },
        },
    }
}
